package com.warm.base.jdk.enums;

import lombok.Getter;

/**
 * 缴费状态
 *
 * @author chenxc
 * @email 997909544@qq.com
 * @date 2019/12/11  10:29
 */
@Getter
public enum ExcelEnum {

    TY(1, "通用"),
    KJ(2, "康检"),
    ZYB(3, "职业病"),
    ;

    private int code;

    private String desc;

    ExcelEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ExcelEnum getEnum(Integer code) {
        for (ExcelEnum type : values()) {
            if (code.equals(type.getCode())) {
                return type;
            }
        }
        return null;
    }
}
